# coding: utf-8

import sys, os

if sys.getdefaultencoding() != 'utf-8':
    reload(sys)
    sys.setdefaultencoding('utf-8')

sys.path.insert(0, '.')

    
from twisted.python import log
from twisted.application import service, internet

from base.web import Application
from handler import main
from util.route_decorator import route
from settings import settings

webapp = Application(route.get_routes(), **settings)

application = service.Application("ide.fm")

pinpinService = internet.TCPServer(8080, webapp, interface="localhost")
pinpinService.setServiceParent(application)
